import request from '@/utils/request'

export default {
    //添加课程信息
    addCourseInfo(courseInfo) {
        return request({
            url: `/eduservice/coures/addCourseInfo`,
            method: 'post',
            data: courseInfo
          })
    },
    //查询所有讲师
    getListTeacher() {
        return request({
            url: `/eduservice/teacher/findAll`,
            method: 'get'
          })
    },
    getCourseInfo(id) {
        return request({
            url: `/eduservice/coures/getCourseInfo/${id}`,
            method: 'get'
          })
    },
    updateCouresInfo(courseInfo) {
        return request({
            url: `/eduservice/coures/updateCouresInfo`,
            method: 'post',
            data: courseInfo
          })
    },
    getPublishCourseInfo(courseId) {
        return request({
            url: `/eduservice/coures/getPublishCourseInfo/${courseId}`,
            method: 'get',
          })
    },
    publicCourse(courseId){
        return request({
            url: `/eduservice/coures/publishCourse/${courseId}`,
            method: 'post',
          })
    },
    getListCourse(){
        return request({
            url: `/eduservice/coures/getListCourse`,
            method: 'get',
          })
    },
    getPageCourse(current,limit,courseQuery){
        return request({
            url: `/eduservice/coures/getPageCourse/${current}/${limit}`,
            method: 'post',
            data: courseQuery
          })
    },
    getPageCourse(current,limit,courseQuery){
        return request({
            url: `/eduservice/coures/getPageCourse/${current}/${limit}`,
            method: 'post',
            data: courseQuery
          })
    },
    getpagePublishCourse(current,limit,publishCourseQuery){
        return request({
            url: `/eduservice/coures/pagePublishCourse/${current}/${limit}`,
            method: 'post',
            data: publishCourseQuery 
          })
    },
    deleteCourse(courseId){
        return request({
            url: `/eduservice/coures/${courseId}`,
            method: 'delete',
          })
    }


}